package com.ecoolex.ying.space.ws;

import java.util.Date;
import java.util.List;

import com.ecoolex.framework.common.exception.BizException;
import com.ecoolex.framework.common.pojo.Page;
import com.ecoolex.framework.common.pojo.Pagination;
import com.ecoolex.framework.common.pojo.Sorting;
import com.ecoolex.ying.space.entity.UserWorks;
import com.ecoolex.ying.space.entity.UserWorksImages;
import com.ecoolex.ying.space.entity.UserWorksOpus;
import com.ecoolex.ying.space.entity.UserWorksOpusItems;
import com.ecoolex.ying.space.entity.UserWorksShopping;
import com.ecoolex.ying.space.entity.UserWorksStatistical;
import com.ecoolex.ying.space.entity.UserWorksVideo;
import com.ecoolex.ying.space.pojo.AddUserWorksDTO;
import com.ecoolex.ying.space.pojo.AddUserWorksImageDTO;
import com.ecoolex.ying.space.pojo.AddUserWorksOpusDTO;
import com.ecoolex.ying.space.pojo.AddUserWorksVideoDTO;
import com.ecoolex.ying.space.pojo.EditUserWorksImageDTO;
import com.ecoolex.ying.space.pojo.EditUserWorksOpusDTO;
import com.ecoolex.ying.space.pojo.EditUserWorksVideoDTO;
import com.ecoolex.ying.space.pojo.QueryShopWindowGoodsDTO;

public interface UserWorksService {

	UserWorks addUserWorksImages(AddUserWorksImageDTO addUserWorksImageDTO,Integer userId,String createUser) throws BizException;
	
	UserWorks addUserWorksVideo(AddUserWorksVideoDTO addUserWorksVideoDTO,Integer userId,String createUser) throws BizException;
	
	UserWorks addUserWorksOpus(AddUserWorksDTO addUserWorksDTO,AddUserWorksOpusDTO addUserWorksOpusDTO,Integer userId,String createUser) throws BizException;
	
	boolean releaseUserWorks(UserWorks record,String updateUser) throws BizException;

	UserWorks editUserWorksImages(UserWorks editUserWorksDTO, EditUserWorksImageDTO editUserWorksImageDTO,Integer userId,String updateUser) throws BizException;

	UserWorks editUserWorksVideo(UserWorks editUserWorksDTO,EditUserWorksVideoDTO editUserWorksVideoDTO,Integer userId,String updateUser)throws BizException;

	UserWorks editUserWorksOpus(UserWorks editUserWorksDTO,EditUserWorksOpusDTO editUserWorksOpusDTO,Integer userId,String updateUser)throws BizException;

	void deleteUserWorksImages(UserWorks userWorks,String updateUser) throws BizException;
	
	void deleteUserWorksVideo(UserWorks userWorks,String updateUser) throws BizException;
	
	void deleteUserWorksOpus(UserWorks userWorks,String updateUser) throws BizException;
	
	boolean praseUserWorks(Integer worksId,String updateUser) throws BizException;
	
	UserWorks getUserWorksById(Integer worksId);
	
	UserWorks getUserWorksByIdForH5(Integer worksId);
	
	Pagination<UserWorks> queryUserWorksList(String title,Integer auditStatus,Sorting[] sorts,Page page);
	
	Pagination<UserWorks> queryUserWorksOpusList(String title,Integer auditStatus,Sorting[] sorts,Page page);
	
	Pagination<UserWorks> queryForH5(String title,Integer worksType,Date now, Sorting[] sorts,Page page);
	
	Pagination<UserWorks> queryWatchForH5(Integer userId,String title,Integer worksType,Date now, Sorting[] sorts,Page page);
	
	Pagination<UserWorks> queryMyUserWorksOpusForH5(String title,Integer worksType,Integer userId,Sorting[] sorts,Page page);
	
	Pagination<UserWorks> queryMyUserWorksForH5(String title,Integer userId,Sorting[] sorts,Page page);
	
	long queryMyUserWorksCountOpusForH5(Integer worksType,Integer userId);
	
	long queryMyUserWorksCountForH5(Integer userId);
	
	Pagination<UserWorks> queryOtherUserWorksOpusForH5(String title, Integer userId, Sorting[] sorts, Page page);
	
	Pagination<UserWorks> queryOtherUserWorksForH5(String title, Integer userId, Sorting[] sorts, Page page);
	
	long queryOtherUserWorksOpusCountForH5(Integer userId);
	
	long queryOtherUserWorksCountForH5(Integer userId);
	
	Pagination<UserWorks> queryMyShopWindowUserWorks(String title,Integer worksType,Integer userId,Sorting[] sorts,Page page);
	
	Pagination<QueryShopWindowGoodsDTO> queryShopWindowGoodsByUserId(Integer userId,Sorting[] sorts,Page page);
	
	long queryShopWindowGoodsCountByUserId(Integer userId);
	
	Pagination<QueryShopWindowGoodsDTO> queryShopWindowGoodsByWorksId(Integer worksId,Sorting[] sorts,Page page);
	
	UserWorksImages getUserWorksImagesByWorksId(Integer worksId);
	
	UserWorksVideo getUserWorksVideoByWorksId(Integer worksId);
	
	UserWorksOpus getUserWorksOpusByWorksId(Integer worksId);
	
	List<UserWorksOpusItems> getUserWorksOpusItemsByWorksId(Integer worksId);
	
	List<UserWorksShopping> getUserWorksShoppingByStorageId(String storageId);
	
	UserWorksShopping getUserWorksShoppingById(Integer id);
	
	UserWorksStatistical getUserWorksStatisticalByWorksId(Integer worksId);

	Pagination<UserWorks> queryBySearchKeyword(String keyword, Page page);

    UserWorks getByIdAndUserId(Integer worksId, Integer userId);
}
